home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
tex
/
meta27
/
mfpandor.lzh
/
panpunct.mf
< prev
next >
Wrap
Text File
|
1990-11-16
|
17KB
|
479 lines
%*****************************************************************************
% Copyright (c) 1989 by N. N. Billawala
%*****************************************************************************
% punct.mf punctuation: common in all character sets
% 21 characters
iff OK "!": "Exclamation point";
beginchar("!",I_w*width#+a_mono#,cap#,0);
min_limit(join_radius)(.5thin_stem.uc);
bot z1=(round(.5w),0);
z0=bot z1+(0,.5accent_dot_diameter);
top z3=(x1,h)//; pos3(stem.uc,-oblique);
onaline(0,3)(2); bot y2=max(bot y1+accent_dot_diameter+2,.3y3);
pos2(thin_stem.uc,-oblique);
p1=dot.b(z1,accent_dot_diameter);
p2=(z3--z3l)softjoin(z3l--z2l)softjoin(z2l--z2r)softjoin(z2r--z3r)
softjoin(z3r--z3)--cycle;
showpoints(0,1,2,3);
adjust(v_a*fitbasis.uc#+m_a*a_mfit#,v_a*fitbasis.uc#+m_a*a_mfit#);
show_character; endchar;
% rotation of shape and slant of position with obliqueness
iff OK "#": "Sharp/number/hash/pound";
beginchar("#",.5width#+b_mono#,ascender#,descender#);
min_limit(join_radius)(.375stem.uc);
multpos(1,2,3,4)(max(1,.75stem.uc),90);
bot lft z3l=(0,round(1.05math_axis-.2h-.5*max(1,.75stem.uc)))//;
z4l=(x3l+.9w,y3l);
bot rt z2l=(w,y3l+round .4h)//;
z1l=(x2l-.9w,y2l);
onaline(1,2)(11); x11=round(.27[x1,x2]);
onaline(3,4)(12); x12=round(.27[x3,x4]);
onaline(11,12)(5,6); top y5=h-mathlines; bot y6=-d+mathlines;
pickup mathpen rotated (angle(z5-z6)-90);
draw z5--z6;
draw (z5--z6) shifted
(max(round .5mathlines+2,round(abs(x2-x1))-2*round(.27(x2-x1))),0);
p1=(z1 soften(z1l,z2l,z2r,z1r) z1)--cycle;
p2=(z3 soften(z3l,z4l,z4r,z3r) z3)--cycle;
showpoints(1,2,3,4,5,6,11,12);
adjust(v_G*fitbasis.uc#+m_a*b_mfit#,v_G*fitbasis.uc#+m_a*b_mfit#);
show_character; endchar;
iff OK "$": "Dollar sign";
beginchar("$",num_width_b#+b_mono#,ascender#,0);
top y2l=bot y2r+max(1,.75minor_curve.uc)=round(.9(h+d));
bot y6r=top y6l-max(1,.75minor_curve.uc)=round(.12(h+d));
rt z1=(.93w,y2r-.05(y2r-y6r))//;
lft z7=(0,y6r+.1(y2r-y6r))//;
z4=(.5w,.52[y6r,y2l])//;
lft z3l=(if narrow_condition:0 else:round(.05w) fi,.5[y4,y2l])//;
rt z5r=(w,.5[y6r,y4])//;
good_x_for(2l)(z3l,z1,.5)a; good_x_for(2r)(z3r,z1-(bulb_thickness,0),.4)b;
good_x_for(6r)(z7,z5r,.5)c; good_x_for(6l)(z7+(bulb_thickness,0),z5l,.6)d;
z3=z3l+(.5stem.uc,0); z5=z5r-(.5stem.uc,0);
ref1=z3..z4..z5;
pos4(stem.uc,(angle (postcontrol 1 of ref1-precontrol 1 of ref1))+90);
rt z3r=(lft x3l+max(1,.75stem.uc),(1-v_stress)[y4r,y2r]);
lft z5l=(rt x5r-.75stem.uc,v_stress[y6l,y4l]);
bot z10=(.5w,-ov_b.uc); multpos(10,11)(max(1,.75thin_stem.uc),-oblique);
top z11=(.5w,h+ov_t.uc)//;
p1=bulb.tr(z1,z2r,z2l,cs,bulb_thickness,90)
o_t z3l{downward} o_t z4l i_t z5l i_t
bulb.bl(z7,z6l,z6r,cs,bulb_thickness,90)
o_t z5r{upward} o_t z4r i_t z3r i_t cycle;
p2=(.5[z10l,z11l] soften(z11l,z11r,z10r,z10l) .5[z10l,z11l])--cycle;
showpoints(1,2,3,4,5,6,7,8,10,11);
adjust(.5num_fit_b#+m_a*b_mfit#,.5num_fit_b#+m_a*b_mfit#);
show_character; endchar;
% currently same width as the lining numbers
iff OK "%": "Percent sign";
beginchar("%",.5width#+d_mono#,ascender#,0);
top y1r=h; bot y1l=top y1r-max(1,.5major_curve.lc);
bot y3r=.6h; top y3l=bot y3r+max(1,.5major_curve.lc);
lft z2r=(0,(1-v_stress)[y3r,y1r])//;
rt z2l=(lft x2r+max(1,.5bowlstem.lc),(1-v_stress)[y3r,y1r]);
rt z4r=(round(.5w),v_stress[y3r,y1r])//;
lft z4l=(rt x4r-max(1,.5bowlstem.lc),v_stress[y3r,y1r]);
good_x_for(1r)(z2r,z4r,.52)a; good_x_for(1l)(z2l,z4l,.48)b;
good_x_for(3r)(z2r,z4r,.48)c; good_x_for(3l)(z2l,z4l,.52)d;
pickup mathpen rotated angle((w,h)//-(0,0)//);
z10=(round(.5w),round(-.6h))//;
top rt z11=(w,h)//;
bot lft z12=(0,0)//;
draw z11--z12;
p1 =z1r{left} o_t z2r{downward} o_t z3r{right} o_t z4r{upward} o_t cycle;
p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle;
p2 =p1 shifted z10;
p2'=p1' shifted z10;
z13r= point 3.5 of p1; pos13(max(1,.5major_curve.lc),90-oblique);
z14r= (.5[x13,x11],y13); pos14(max(1,.35bowlstem.lc),90-oblique);
z15=z11+(.5mathlines,0)rotated (angle((w,h)//-(0,-d)//)+90);
p3=z13l...z14l{right}...z15--z15...z14r{left}...z13r--cycle;
showpoints(1,2,3,4,11,12,13,14,15);
adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_C*fitbasis.uc#+m_a*d_mfit#);
show_character; endchar;
iff OK "&": "Ampersand";
beginchar("&",.65width#+d_mono#,cap#,0);
bot y6r=top y6l-thin_stem.uc=-ov_b.uc;
top y2l=y2r+max(1,.9thin_stem.uc)=h+ov_t.uc;
z4=.65[z6r,z2l];
rt z1l=(.75w if narrow_condition:+.05w fi,.5[y4,y2r])//;
pos1(max(1,.9thin_stem.uc),180);
lft z3l=(round(.25w),.5[y4,y2r])//;
pos3(max(1,.9stem.uc),0);
z5=(if narrow_condition:.93w else:.9w fi,.8[y6r,y4])//;
z11=(.95[x6l,x5],y5-terminal_thickness-.07h);
multpos(5,11)(max(1,if narrow_condition:.8 else:.9 fi *thin_stem.uc),0);
lft z7r=(0,.45[y6r,y4])//; rt z7l=z7r+(bowlstem.uc,0); z7=.5[z7l,z7r];
z8=.5[z7r,z1l];
good_x_for(2r)(z3r,z1r,.5)a; good_x_for(2l)(z3l,z1l,.5)b;
good_x_for(6l)(z7l,z11l,.4)c; good_x_for(6r)(z7r,z11r,.4)d;
x6l:=min(x6l,x6r+thin_stem.uc);
z9l=z8;
bot rt z10=(.9w,0); pos10(max(1,.57stem.uc),10);
ref0=z1{downward}..z8..z7{downward};
pos8(max(1,thin_stem.uc),angle(direction 1 of ref0)+90);
pos9(max(1,.9stem.uc),angle(direction 1 of ref0)+180);
ref1=z2r{left} i_t z3r{downward}...
subpath(0,4)of reverse terminalserif.r(z10,z9,z9l,z9r,.5ts,0)soft;
ref2=subpath(4,20)of reverse terminalserif.r(z10,z9,z9l,z9r,.5ts,0)soft
...z3l{upward} o_t z2l{right};
ref3=z6r{left} o_t z7r{upward} o_t z8l i_t z1r{upward} i_t z2r{left};
ref4=z6l{left} i_t z7l{upward} i_t z8r o_t z1l{upward} o_t z2l{left};
ref5=z5l..z11l i_t z6l{left};
ref6=reverse terminalserif(z5,z11,z11l,z11r,.75hs,0) o_t z6r{left};
(t1,t2)=ref1 intersectiontimes ref3; (t3,t4)=ref2 intersectiontimes ref3;
(t5,t6)=ref1 intersectiontimes ref4; (t7,t8)=ref2 intersectiontimes ref4;
(t9,t10)=ref1 intersectiontimes ref5; (t11,t12)=ref2 intersectiontimes ref5;
(t13,t14)=ref1 intersectiontimes ref6;(t15,t16)=ref2 intersectiontimes ref6;
p1 =reverse(subpath(0,t14)of ref6--subpath(t13,infinity)of ref1--
subpath(0,t15)of ref2--subpath(t16,infinity)of ref6--
subpath(0,t4)of ref3--subpath(t3,infinity)of ref2--
subpath(infinity,t6)of ref4--subpath(t5,t9)of ref1--
subpath(t10,1)of ref5)--cycle;
p1'=subpath(0,t1)of ref1--subpath(t2,infinity)of ref3--cycle;
p2'=subpath(0,t8)of ref4--subpath(t7,t11)of ref2--
subpath(t12,infinity)of ref5--cycle;
showpoints(1,2,3,4,5,6,7,8,9,10,11,41,42,43,44,45,46,47,48,100);
adjust(v_C*fitbasis.uc#+m_a*d_mfit#,v_G*fitbasis.uc#+m_a*d_mfit#);
show_character; endchar;
iff OK "'": "Single right quote or apostrophe";
beginchar(oct"047",I_w*width#+a_mono#,cap#,0);
save_num(head)=accent_dot_diameter;
top z1=(.5w,.75[xheight,cap]-.5head)//;
ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0);
p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique);
showpoints(1);
adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#);
show_character; endchar;
% rotation and slant of position with obliqueness
iff OK "(": "Left parenthesis"; % need to add shift if w>.45h
beginchar("(",.25width#+b_mono#,maxheight#,maxdepth#);
save_num(width_limit)=min(w,.4(h+d));
parenthesis_curl:=2; def p_c={curl parenthesis_curl} enddef;
min_limit(join_radius)(max(.5,.37thin_stem.uc));
top z1l=(width_limit,h)//;
bot z3l=(width_limit,-d)//;
lft z2l=.5[z1l,z3l]+(width_limit,0)rotated(180-oblique);
pos2(max(1,.75stem.uc),-oblique);
ref1=z1l...z2l{downward}...z3l;
pos1(max(1,.75thin_stem.uc),angle(direction 0 of ref1)+90);
pos3(max(1,.75thin_stem.uc),angle(direction 2 of ref1)+90);
ref2=z1l p_c..z2l{downward}..p_c z3l; ref3=z3r p_c..z2r{upward}..p_c z1r;
if softpath:p1=(z2l{downward}..p_c z3l)softjoin(z3l--z3r)softjoin
ref3 softjoin(z1r--z1l)softjoin(z1l p_c..z2l{downward})--cycle;
else:p1=ref2--ref3--cycle; fi
showpoints(1,2,3);
adjust(v_C*fitbasis.uc#+m_c*b_mfit